package tpalgo3.vista;

import java.awt.Color;
import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

import tpalgo3.vista.util.VistaUtil;

public class TableroSquare extends JPanel {
	private static final long serialVersionUID = 5655557392946912381L;
	
	private int equis;
	private int igriega;
	
	public TableroSquare() {
		super();
	}
	
	public int getEquis() {
		return equis;
	}
	public void setEquis(int equis) {
		this.equis = equis;
	}
	public int getIgriega() {
		return igriega;
	}
	public void setIgriega(int igriega) {
		this.igriega = igriega;
	}
	
	public static TableroSquare armaImagen(String pathImagen, Color colorDeFondo, int equis, int igriega) {
		TableroSquare square = new TableroSquare();
		square.setPreferredSize(new Dimension(35, 35));
		square.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));
		square.setBackground(colorDeFondo);
		square.setEquis(equis);
		square.setIgriega(igriega);
		JLabel iconoLabel = new JLabel();
		iconoLabel.setIcon(VistaUtil.createImageIcon(pathImagen));
		square.add(iconoLabel);
		return square;
	}
}